﻿using System;
using System.Xml.Linq;

namespace CodeCounsel.SharePoint.RibbonDesigner.Model
{
    public abstract class Control
        : NamedDomainElement
    {
        public string TemplateAlias
        {
            get { return DataModel.GetAttributeValue(Schema.TemplateAlias); }
            set { DataModel.SetAttributeValue(Schema.TemplateAlias, value); }
        }

        protected Control(XElement dataModel, DomainModelSource source)
            : base(dataModel, source)
        {
        }

        protected Control()
        {
        }

        protected Control(RibbonId id)
            : base(id)
        {
        }
    }
}
